#!/bin/bash
echo "应用ROCm runner修复..."

# 设置环境
export HSA_OVERRIDE_GFX_VERSION=9.0.6
export ROCR_VISIBLE_DEVICES=0

# 检查库文件
echo "检查ROCm库..."
find /usr -name "librocblas.so*" 2>/dev/null | head -5
find /usr -name "libhipblas.so*" 2>/dev/null | head -5

# 预加载库
export LD_PRELOAD="/usr/lib/x86_64-linux-gnu/librocblas.so:/usr/lib/x86_64-linux-gnu/libhipblas.so"

echo "修复应用完成"